package Algorithm.RandomRollCallDevice;

import java.util.Random;

// 简单随机点名(Random)
public class First {
    public static void main(String[] args) {
        Random rand = new Random();
        String[] students = {"Jack", "Nick", "Black", "Alice", "Marks", "Mike"};
        for (int i = 0; i < 5; i++) {
            int randomIndex = rand.nextInt(students.length);
            System.out.print(students[randomIndex] + " ");
        }
    }
}
